/**
 * Created by JetBrains PhpStorm.
 * User: hellreuter
 * Date: 3/20/12
 * Time: 1:22 AM
 * To change this template use File | Settings | File Templates.
 */
Ext.define('CT.view.secretario.Grid',{
    extend: 'Ctc.view.EditorGrid',
    alias: 'widget.gridsecretario',
    store: 'Secretarios',
    requires: 'Ext.ux.grid.checkcolumn.CheckColumn',
    buildColumns: function(){
        return [
            {xtype: 'rownumberer'},
            {header: 'Ficha', dataIndex:'ficha', width: 50 },
            {header: 'Nombre', dataIndex: 'nombre', flex: 1,editor: { allowBlank: false, vtype: 'textspace' }},
            {header: 'Apellidos', dataIndex: 'apellidos', flex: 1, editor: { allowBlank: false, vtype: 'textspace' }},
            {dataIndex: 'activo', align: 'center', width: 40, xtype: 'checkcolumn', editor: { xtype: 'checkbox', cls: 'x-grid-checkheader-editor' }},
            {align:'center', width: 40,renderer:this._renderEliminar, editor:{xtype:'hiddenfield'}}
        ];
    },
    _renderEliminar:function(value){
        return "<img src='img/icons/16/del.png' style='cursor:pointer'>";
    }
});